/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License
 *
 *
 * @author: jin Chen 
 * @date: Nov 17, 2005$
 * @version: 1.0
 */
package edu.psu.geovista.app.gmatrix.canvas;

import java.awt.*;

public class RectangleSymbol extends AbstractSymbol{



    public void paint(Graphics g, Cell cell) {
        Point index = cell.getIndex();

        Color color = cell.getForeground();
        Rectangle bd = cell.getSymbolBoundary();
        boolean draw3D = cell.isStyle3d();
        if(index.x ==0&&index.y==0){

           

        }
        else{
           Rectangle sbd = cell.getSymbolBoundary();
           // System.out.println("cell["+index.x+","+index.y+"] size("+bd.width +","+bd.height +")");
        }

        g.setColor(color );

        if(draw3D ){
            g.fill3DRect( bd.x,bd.y,bd.width ,bd.height,true );
        }
        else{
          //  System.out.println("paint symbol["+index.x+","+index.y+"] size("+bd.width +","+bd.height +") at ["+bd.x+","+bd.y+"] in color"+color.toString() );
           g.fillRect( bd.x,bd.y,bd.width ,bd.height );
        }

    }
     public Point getSymbolCenter(Rectangle symbolBound){
        Rectangle bd = symbolBound;
        int x = bd.x+bd.width/2;
        int y = bd.y+bd.height /2;
        return new Point(x,y);

    }


}
